<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%
    String ctx=request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>后台管理 - 易买网</title>
    <link type="text/css" rel="stylesheet" href="../css/style.css" />
    <script type="text/javascript" src="../scripts/jquery.min.js"></script>
    <script type="text/javascript" src="../scripts/My97DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" src="../scripts/function.js"></script>
</head>
<body>
<jsp:include page="top.jsp" />
<div id="main" class="wrap">
    <jsp:include page="leftbar.jsp" />
    <div class="main">
        <h2>修改商品</h2>
        <div class="manage">
            <form action="<%=ctx%>/Product/update" method="post" id="productAdd">
                <table class="form">
                    <tr>
                        <td class="field">商品名称(*)：</td>
                        <td>
                            <input type="hidden" name="epId" value="${product.epId}"  />
                            <input type="text" class="text" name="epName" value="${product.epName}" />
                            <span></span>
                        </td>
                    </tr>
                    <tr>
                        <td class="field">描述：</td>
                        <td><input type="text" class="text" name="epDescription" value="${product.epDescription}"/></td>
                    </tr>
                    <tr>
                        <td class="field">所属分类：</td>
                        <td>
                            <select name="epcChildId" >
                                <c:forEach items="${categories}" var="category">
                                    <c:if test="${category.epcParentId==category.epcId}">
                                        <option value="${category.epcId}" disabled>${category.epcName}"</option>
                                    </c:if>
                                    <c:if test="${category.epcParentId!=category.epcId}" >
                                        <option value="${category.epcId}"
                                                <c:if test="${category.epcId==product.epcChildId}">selected="selected"</c:if>>└${category.epcName}
                                        </option>
                                    </c:if>
                                </c:forEach>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td class="field">商品价格(*)：</td>
                        <td><input type="text" class="text tiny" name="epPrice" value="${product.epPrice}"  /> 元<span></span>
                        </td>
                    </tr>
                    <tr>
                        <td class="field">库存(*)：</td>
                        <td><input type="text" class="text tiny" name="epStock" value="${product.epStock}"  /><span></span>
                        </td>
                    </tr>
                    <tr>
                        <td class="field">商品图片(*)：</td>
                        <td><input type="file" class="text" name="uploadFile" /><span></span></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td><label class="ui-blue"><input type="submit" name="submit" value="确定" /></label></td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
    <div class="clear"></div>
</div>
<div id="footer">
    Copyright &copy; 2013 汉唐知本 All Rights Reserved. 京ICP证1000001号
</div>
</body>
</html>
